AFO 642 - Monitor processes

642.1 Introduction[//]

Processes that take a lot of time can be started at various points in the system. Examples of such processes are:

·         Creating print files with reservation pick-up notices or overdue notices;

·         Updating statistics and cash register reports;

·         SSP commands.

Processes such as these can -depending on the size of the database, the complexity of the process started and the speed of the hardware- take a few minutes to several hours to complete.

The following methods can be used to start processes:

·         ‘online’:
the process begins immediately as an online process at the workstation from which the command is issued; this workstation continues to be 'engaged' until the process is complete.

·         ‘batch’:
the process begins immediately, but as a separate process; the workstation from which the process was initiated is immediately available for other activities.

·         ‘in memory’:
the process is not started immediately, but is placed in a queue for later processing; the actual time at which the process is to start is specified.

For an explanation of the methods for starting processes, refer to the paragraph ‘ProcessControl’ in the ‘Principles that transcend AFO boundaries’ chapter’.

Processes started in this manner can be monitored. If you start a process ‘online’, the workstation is engaged and can be monitored from that workstation screen as long as the process is running. If you start a process in ‘batch’ or ‘in memory’, the monitoring takes place via AFO 642. You can also use this AFO to view processes that are already complete and you can manage the procedure for the so-called night watchman.

642.2 The night watchman and ‘night jobs’ [//]

The night watchman starts ‘night jobs’ automatically and can also stop them, if necessary. Processes that take a great deal of time are, in principle, run at night so as not to increase the system load needlessly during the day. You can start both periodic and one-time commands.

The night watchman starts these processes in a uniform manner for all host operating systems. The night watchman is itself a process that can be monitored in AFO 642 and that must be started at a specified time.

A special night job is to do a backup. To do a backup correctly, Vubis must be stopped, so that goes for the night watchman as well. After the backup is complete, the system can be restarted, and the night watchman becomes active again. In most cases, there is a script in which is defined in what way this stopping and starting takes place. Simply put, the script contains the following commands:

·         Stop Vubis

·         Do the backup

·         Start Vubis (and the night watchman)

This script will run at fixed points in time. The way this is done, depends on the host operating system.

Below is an explanation of how the interaction with the host operating system takes place for the most common platforms and how the system must be configured to be able to start 'night jobs' efficiently. These platforms are:

·         Unix;

·         VMS;

·         Windows NT.

Each of these operating systems has the possibility to start certain processes on OS level automatically on certain days and certain times.

642.2.1 Unix-platforms[//]

Unix has a mechanism known as ‘cron’. This mechanism ensures that processes can be started at specific times. This cron uses tables, the ‘crontabs’, which can be modified via a menu or an editor. The data is stored in files (scripts) that are found in “/usr/spool/cron/crontabs/root”. Using ‘cron’ you can start processes on specific days of the week, specific fixed days of the month and at specific times. To activate the night watchman you include in the ‘root’ crontab a reference to a script file that will activate the night watchman.

Note!

It is recommended that you execute this system script file each night after the backups have been made.

Example

15 00 * * * /systemdir/the system.batch

This means: the script /systemdir/system.batch is started every night (* * *) 00:15 (15 00). You must define the script file this refers to:

cd /systemdir
msqlm “^VMNIGHT”
cd /

This means:

Do a ‘change directory’ to the Unix directory in which the system database resides;
start the system program VMNIGHT

Note!

The content of the script is not an example. These lines must be entered exactly as shown here; pay attention to the distinction between small letters and capital letters.

The third line (cd /) is optional and ensures that the system returns to the root directory.

Consult your Unix system manuals for additional information about the cron mechanism.

Note!

The procedure described above is used on systems where the system operates under M/SQL, the M-Technology version from Intersystems. If your system operates under MSM, the M-Technology version from Micronetics, another script is used. Consult the helpdesk for this.

642.2.2 VMS-platforms

To start the night watchman on a VMS system you can use the facilities VMS offers for this purpose. One possibility is to include the SUBMIT command in the VMS startup procedure. This SUBMIT  command can specify that the night watchman must be started each evening or each night at a specific time. Use the SUBMIT command to execute a file that starts the night watchman.

Define the SUBMIT as follows:

SET DEF $1$DIA2:[MSQL_MGR SYSTEM]
M “^VMNIGHT”

This means:

Do a ‘change directory’ to the VMS directory in which the system database resides: $1$DIA2:[MSQL_MGR.SYSTEM]
start the system program VMNIGHT

Note!

This is not an example; these lines must be entered exactly as shown here; pay attention to the distinction between small letters and capital letters.

Consult your VAX/VMS manuals for additional information.

642.2.3 Windows NT[//]

Windows NT contains a mechanism known as ‘Scheduler’, to start processes at a specific time. For a description of this function, please refer to the Windows NT documentation.

To activate the Vubis night watchman, include a reference to a batch file that will activate the Vubis night watchman in the Windows NT scheduler. We recommend that you execute this batch file each night after you have made all your backups. The command in scheduler looks like this:

AT 01:00 /every:m,t,w,th,f,s,su CMD /C c:\cachesys\bin\vmnight.bat

This line means that the batch file c:\cachesys\bin\vmnight.bat is started every night (/every:m,t,w,th,f,s,su) at one o’clock. Define the batch file as follows:

c::
cd \cachesys\bin
css CTERMINAL VUBIS ^^VMNIGHT VBS

This means:

1.     go to the disk on which the Cache software resides (in our example c);

2.     do a ‘change directory’ to the Windows NT directory where the Caché system files are located (in our example ‘\cachesys\bin’);

3.     start the program VMNIGHT (this is not an example, these lines must be entered exactly as shown here. Pay attention to the distinction between small letters and capital letters).

642.3 Monitor Processes[//]

At various points within AFO 642 you see a list of processes. The system distinguishes the following types of overviews:

·         an overview of the active processes (with the status ‘running’ or ‘stopped’);

·         an overview of the processes started (with the status ‘running’, ‘stopped’ or ‘finished’);

·         an overview of the periodic commands;

·         an overview of the one-time commands;

·         a password-related overview (the overview of the processes started with your password).

Each process goes through a number of phases, each of which is characterised by one of the following statuses:

·         in queue;

·         running;

·         stopped;

·         completed.

When you start AFO 642, a menu appears:

The menu options are explained separately in the following paragraphs.

642.3.1 Active jobs[//]

If you select this menu option, a list of active processes appears.

Columns on the screen

Process: This contains the process number.

Process identification: A brief description of the process.

Status: This contains the current status of the process.

Last action: This contains the time the last action was performed.

Options on the screen

Monitor process (+):Select a process and then select this option to view the data for this process.

Process status (+):Select a process and select this option to display a list of statuses (complete, running, stopped, in queue) for the process in question.

Monitor process (+)

If you select the ‘Monitor process’ option, an input screen appears with additional information about the process. You can also halt the process from this screen

Options on the screen

Current status of process: Select this option for an overview of the current status of this process. The data in this overview gives a snapshot of the process. Repeat this option to determine whether the process is still active.

Stop: Select this option to interrupt the process. When you select this option, the system will ask you if you really want to stop the process.

Check: Select this option to check whether the process is still running. The system checks for one minute to see if the process is still active. During this check, the system reports on the program’s progress.

Detailed info: Select this option to display a list of statuses (ready, active, stopped, in queue) for the process in question. This option is identical to the option ‘Process status’ on the previous screen.

642.3.2 List of started jobs[//]

If you select this menu option, a screen with an overview of the processes that have been started appears. The options and operation for monitoring started processes is identical to those for active processes.

642.3.3 Regularly scheduled jobs[//]

Periodic process control allows you to modify the list of processes that must be performed periodically.

Processes are placed in a queue by selecting M(emory) when starting the process - rather than O(nline) or B(atch). The system will then ask you to specify the date and time at which the process must be started. This can occur once or at periodic intervals. Processes are thus not placed in the table in AFO 642, but in the AFO from which the process would normally be started. The night watchman will start the process at the moment you have specified.

Notes

·         Do not start more than four processes within a time span of one minute.

·         Start similar processes as quickly as possible after one another.

-        For example, if you want to create a print file for reminders in AFO 451, renew a membership card and automatically change a borrower’s categories, and want to execute a selection from the borrower file in AFO 435, you can start these processes immediately after one another. All four processes check the borrower file and, as a result of memory caching, can ‘profit’ from each other’s tasks and thus work more efficiently.

·         Do not start too many dissimilar processes at the same time, because this can result in poor response times. For example, do not simultaneously start a selection from the descriptions file, the barcode file, and the borrower file as well as a process that creates a print file with reminders.

·         Divide the amount of time available during the night into ‘logical segments’.

-       For example, first enter all processes that perform actions on the borrower file, then all processes that use the orders file, etc.

·         Place critical processes at the start of the list and non-critical processes further down.

·         The number of processes that can be started simultaneously is determined by the M-license installed on your system. Be sure not to exceed the limit for the maximum number of simultaneous processes. If you do, the process will not be started.

If you select this menu option, a survey screen appears with periodic orders.

Columns on the screen

Process: This contains the process number.

Process identification This contains the description of the process.

Status: This contains the date and time at which the process is to start. The field shows the day of the week, the calendar day and the time in that sequence.

Options on the screen

Monitor process (+):Select a process and then select this option to display the data. An overview screen appears. This screen is explained below.

Delete (+):Select a process and then select this option to delete a process.

Note!

Processes cannot be deleted from lists if they are still active.

Process status (+):Select a process and select this option to display a list of statuses (complete, running, stopped, in queue) for the process in question.

Process report (+):Select a process and select this option to generate a report for this process. The standard dialog screen for generating output will be presented.

Monitor process (+):Select a process and then select this option to display the data. An overview screen appears:

Options on the screen

Memory tuning: Select this option to change the date and time data for the process. If you select this option, an input screen appears in which you can specify the days of the month, the week and the time. An asterisk  ( * ) means that the process can be performed each month, each week day and at any time, respectively.

Note

For more information about valid notation, see the description of the memory option in the ‘Process Control’ paragraph in the ‘Principles that transcend AFO boundaries’ chapter.

Memory settings: This option is the same as Memory tuning.

642.3.4 Once off jobs[//]

Managing once off jobs displays a list of all processes that will be performed once. The working method and the options on this screen are totally identical to the working method and options for managing periodic jobs.

Since the jobs in this list are only executed once, they are deleted from the list as soon as the process starts.

642.3.5 Overview of jobs by password[//]

If you choose this menu option, an overview screen appears with the active processes started by your password. The working method and the options on this screen are totally identical to the working method and options of active processes.

642.3.6 Timetable/ parameters[//]

This menu option allows you to define a number of parameters related to the night watchman. First read the “642.2 ” paragraphs for more information about the night watchman.

If you select this menu option, a screen appears with a timetable.

Options on the screen

Select no.: Select a weekday and then select this option to set the time parameters. An input screen appears:

Fields on the screen

Do not activate between: Enter a time interval (use the format hh:mm). If the system is started during this period, the night watchman will not start automatically. The night watchman will start automatically outside the specified period. This period must be somewhat ‘longer’ than the period in which the system would normally be used. For example, if you normally use the system between 8:00 a.m. and 8:30 p.m., you would enter “07:30-21:00” here.

Shut down at: Enter the time at which the night watchman must be stopped. We recommend that you stop the night watchman at bit earlier than the period at which you normally begin working with the system. The night watchman will stop at the moment you specify and the process will be deleted from the table of active processes.

Note

You can prevent automatic starting of the night watchman outside the specified period, since the system asks “Start night watchman? <Y>”  when it starts the process. If you enter “N” here, the night watchman will not start. The system gives you one minute in which to enter “N”. After that, the night watchman process begins..

642.3.7 Manually start Nightwatchman[//]

The menu option ‘Night watchman’ is intended to enable you to start the night watchman manually. If you use this option, you must also specify the time at which the system must be automatically stopped to start the back-up procedure using the ‘Timetables/parameters’ option.

If you select this menu option, a screen appears:

This screen shows the time (if set with the option ‘Timetables/parameters’) at which the system will be stopped.

Select OK to continue.

The system switches immediately to the standard procedure for starting processes. Read the paragraph, ‘Process control’ in the ‘Principles that transcend AFO boundaries’ chapter for more information about this procedure.

Note!

The night watchman cannot be started from ‘memory’.

642.3.8 Remove jobs after how many days[//]

With this option you can specify after how many days started processes that are no longer active can be removed from the list displayed in ‘List of started jobs’.

After choosing this option an input screen is displayed:

Enter the required number of days.


·                     Document control - Change History

 

Version

Date

Change description

Author

1.0

unknown

creation

 

2.0

January 2007

amended terminology